\newpage
\section{Fourier series}

The Taylor series approximation by polynomial functions allows a local approximation to the function. However, if we are interested to approximate a function over an interval, the Taylor approximation may fail.

\subsection{Waves}
A wave is a periodic function which can be expressed as follows:


\begin{equation*}
f(t) = A\sin{\pi}
\end{equation*}

\sageplot[width=8cm]{plot(sin(x), 0, 2*pi, fontsize=16)}

\subsection{Fourier expression}
Given a function $f(t)$ which is periodic between the limits $[-\pi,\pi]$ and is continous in this interval (or has a limited number of finite discontinuities in this interval), it is possible to express this function in terms of sine and consine functions. The following mathematical expression is called Fourier series:

\begin{equation*}
f(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}[a_n \cos{(n x)} + b_n \sin{(n x)}]
\end{equation*}

the coefficients $a_n$ and $b_n$ are given by

\begin{equation*}
a_n = \frac{1}{\pi} \int_\pi^\pi f(x) \cos(n x)\, dx
\end{equation*}

\begin{equation*}
b_n = \frac{1}{\pi} \int_\pi^\pi f(x) \sin(n x)\, dx
\end{equation*}

Note that the first term of the Fourier series $a_0/2$ is actually the average of the function $f(x)$

The Fourier series allows us to transform a function into a sum of waves. This information gives us the freedom to describe the shape of any function in terms of frequencies and amplitudes.
\subsection{The power spectrum}
The coefficients of the Fourier-series expansions are often not physically significant because they depend on the choice of the origin we pick for the periodic function. However, the quantity $a_n^2 + b_n^2$ is invariant under translations, and is therefore much likely to have physical significance than the invidual coefficients. This quantity (or its square root) is called \emph{the power frequency of n}. A plot of $a_n^2 + b_n^2$ as a function of $n$ is called \emph{power spectrum}
